//
//  StorageViewController.m
//  Mid_Project
//
//  Created by 王世界 on 2020/11/30.
//

#import "StorageViewController.h"
#import "Masonry.h"
#import "AFNetworking.h"
#import "single.h"
@interface StorageViewController ()

@end

@implementation StorageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithRed:242.0/255 green:242.0/255 blue:247.0/255 alpha:1];
    self.Data = [Single sharedInstance].datalist1[0];
//    UILabel *about = [[UILabel alloc]  init];
//    about.text = @"存储";
//    [self.view addSubview:about];
//    [about mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.equalTo(self.view.mas_top).with.offset(self.view.frame.size.height*0.2);
//        make.left.equalTo(self.view.mas_left).with.offset(self.view.frame.size.width*0.2);
//        make.width.equalTo(self.view.mas_width).multipliedBy(0.2);
//        make.height.equalTo(self.view.mas_height).multipliedBy(0.05);
//    }];
//    about.numberOfLines = 1;
//    about.layer.borderWidth = 1;
//    about.font = [UIFont systemFontOfSize:20];
    
    UILabel *detail = [[UILabel alloc] init];
    [self.view addSubview:detail];
    [detail mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).with.offset(self.view.frame.size.height*0.2);
        make.centerX.equalTo(self.view);
        make.width.equalTo(self.view.mas_width).multipliedBy(0.8);
        make.height.equalTo(self.view.mas_height).multipliedBy(0.3);
    }];
    
    
    detail.backgroundColor = [UIColor whiteColor];
    detail.layer.borderWidth = 1;
    detail.layer.cornerRadius = 10;
    _l1 = [[UILabel alloc] init];
    _l2 = [[UILabel alloc] init];
    _l3 = [[UILabel alloc] init];
    [self.view addSubview:_l1];
    [self.view addSubview:_l2];
    [self.view addSubview:_l3];
    [_l1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).with.offset(self.view.frame.size.height*0.2-50);
        make.left.equalTo(detail.mas_left).with.offset(10);
        make.width.equalTo(self.view.mas_width).multipliedBy(0.8);
        make.height.equalTo(self.view.mas_height).multipliedBy(0.3);
    }];
    [_l2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).with.offset(self.view.frame.size.height*0.2);
        make.left.equalTo(detail.mas_left).with.offset(10);
        make.width.equalTo(self.view.mas_width).multipliedBy(0.8);
        make.height.equalTo(self.view.mas_height).multipliedBy(0.3);
    }];
    [_l3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(detail.mas_top).with.offset(80);
        make.left.equalTo(detail.mas_left).with.offset(10);
        make.width.equalTo(self.view.mas_width).multipliedBy(0.8);
        make.height.equalTo(self.view.mas_height).multipliedBy(0.3);
    }];
    
    NSString *str = [NSString stringWithFormat:@"最大容量:  %@",self.Data[@"MaxSize"]];
    _l1.text = str;
    str = [NSString stringWithFormat:@"已用容量:  %@",self.Data[@"UsedSize"]];
    _l2.text = str;
    str = [NSString stringWithFormat:@"单一容量:  %@",self.Data[@"SingleSize"]];
    _l3.text = str;
   // [self makeBackGround];
    
    
    // Do any additional setup after loading the view.
}

@end
